Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODValueNameSpace


GetEntry

The GetEntry method searches for an entry with the specified key and, if it exists, gets the value associated with that key.

ODBoolean GetEntry (in ODISOStr key, 
                    out ODByteArray value);
key
The key to search for in this value name space.
value
A byte array structure to contain the value corresponding to the specified key, if the entry is found.
return value
kODTrue if the entry was found, otherwise kODFalse.
DISCUSSION
If the specified key is found, this method copies the entry's associated value into the value parameter. If the specified key is not found in this name space, this method searches the parent name space. Searches proceed from each value name space to its parent until one of the following happens: the entry is found, there is no parent name space to search, or the parent name space is an object name space instead of a value name space.

If the key is found, the _buffer field of the value output parameter is set to point to a memory block containing the a copy of the value associated with the key. If the key is not found after searching this value name space and its ancestors, the _buffer field of the value parameter is set to kODNULL.

Your part must delete the byte array and its buffer when they are no longer needed.

SEE ALSO
The ODByteArray type (page 877).
The ODISOStr type (page 875).
The ODNameSpace::Exists method (page 429).
The ODValueNameSpace::Register method (page 822).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help